//package com.kqzz.tbxt.config;
//
//import com.kqzz.common.config.log.mdc.LogInterceptor;
//import com.kqzz.common.utils.SystemContants;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
//
///**
// * @author 张浩
// * @version 1.0
// * @ClassName InterceptorConfig
// * @Description 拦截器配置
// * @date 2022年05月25日 15:20
// */
//@Configuration
//public class InterceptorConfig extends WebMvcConfigurationSupport {
//
//    @Value("${kqzzMS.affixDir}")
//    private String BASE_PATH;
//
////    @Override
////    public void addInterceptors(InterceptorRegistry registry) {
////		// 注册日志链路追踪拦截器
////        registry.addInterceptor(new LogInterceptor())
////        		.addPathPatterns("/**")
////        		.excludePathPatterns("/login","/captcha","/download","/upload","/oauth/**","/error",
////        				"/webjars/**","/actuator/**","/webjars/**","/resources/**","/v2/api-docs",
////        				"/swagger-resources/configuration/ui","/swagger-resources","/swagger-resources/configuration/security",
////        				"/doc.html","/css/**","/js/**","/static/**","/favicon.ico");
////    }
//
//    @Override
//    public void addResourceHandlers(ResourceHandlerRegistry registry) {
//        //Swagger2
//        registry.addResourceHandler("/**").addResourceLocations("classpath:/static/");
//        registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
//        registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
//        registry.addResourceHandler("/doc.html").addResourceLocations("classpath:/META-INF/resources/");
//        //文件
//        registry.addResourceHandler(SystemContants.ROUTE_PREFIX+"**").addResourceLocations("file:" + BASE_PATH);
//    }
//}
